# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Language.V1.Model.XPSTrainResponse do
  @moduledoc """


  ## Attributes

  *   `deployedModelSizeBytes` (*type:* `String.t`, *default:* `nil`) - Estimated model size in bytes once deployed.
  *   `errorAnalysisConfigs` (*type:* `list(GoogleApi.Language.V1.Model.XPSVisionErrorAnalysisConfig.t)`, *default:* `nil`) - Optional vision model error analysis configuration. The field is set when model error analysis is enabled in the training request. The results of error analysis will be binded together with evaluation results (in the format of AnnotatedExample).
  *   `evaluatedExampleSet` (*type:* `GoogleApi.Language.V1.Model.XPSExampleSet.t`, *default:* `nil`) - Examples used to evaluate the model (usually the test set), with the predicted annotations. The file_spec should point to recordio file(s) of AnnotatedExample. For each returned example, the example_id_token and annotations predicted by the model must be set. The example payload can and is recommended to be omitted.
  *   `evaluationMetricsSet` (*type:* `GoogleApi.Language.V1.Model.XPSEvaluationMetricsSet.t`, *default:* `nil`) - The trained model evaluation metrics. This can be optionally returned.
  *   `explanationConfigs` (*type:* `list(GoogleApi.Language.V1.Model.XPSResponseExplanationSpec.t)`, *default:* `nil`) - VisionExplanationConfig for XAI on test set. Optional for when XAI is enable in training request.
  *   `imageClassificationTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSImageClassificationTrainResponse.t`, *default:* `nil`) - 
  *   `imageObjectDetectionTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSImageObjectDetectionModelSpec.t`, *default:* `nil`) - 
  *   `imageSegmentationTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSImageSegmentationTrainResponse.t`, *default:* `nil`) - 
  *   `modelToken` (*type:* `String.t`, *default:* `nil`) - Token that represents the trained model. This is considered immutable and is persisted in AutoML. xPS can put their own proto in the byte string, to e.g. point to the model checkpoints. The token is passed to other xPS APIs to refer to the model.
  *   `speechTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSSpeechModelSpec.t`, *default:* `nil`) - 
  *   `tablesTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSTablesTrainResponse.t`, *default:* `nil`) - 
  *   `textToSpeechTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSTextToSpeechTrainResponse.t`, *default:* `nil`) - 
  *   `textTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSTextTrainResponse.t`, *default:* `nil`) - Will only be needed for uCAIP from Beta.
  *   `translationTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSTranslationTrainResponse.t`, *default:* `nil`) - 
  *   `videoActionRecognitionTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSVideoActionRecognitionTrainResponse.t`, *default:* `nil`) - 
  *   `videoClassificationTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSVideoClassificationTrainResponse.t`, *default:* `nil`) - 
  *   `videoObjectTrackingTrainResp` (*type:* `GoogleApi.Language.V1.Model.XPSVideoObjectTrackingTrainResponse.t`, *default:* `nil`) - 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :deployedModelSizeBytes => String.t() | nil,
          :errorAnalysisConfigs =>
            list(GoogleApi.Language.V1.Model.XPSVisionErrorAnalysisConfig.t()) | nil,
          :evaluatedExampleSet => GoogleApi.Language.V1.Model.XPSExampleSet.t() | nil,
          :evaluationMetricsSet => GoogleApi.Language.V1.Model.XPSEvaluationMetricsSet.t() | nil,
          :explanationConfigs =>
            list(GoogleApi.Language.V1.Model.XPSResponseExplanationSpec.t()) | nil,
          :imageClassificationTrainResp =>
            GoogleApi.Language.V1.Model.XPSImageClassificationTrainResponse.t() | nil,
          :imageObjectDetectionTrainResp =>
            GoogleApi.Language.V1.Model.XPSImageObjectDetectionModelSpec.t() | nil,
          :imageSegmentationTrainResp =>
            GoogleApi.Language.V1.Model.XPSImageSegmentationTrainResponse.t() | nil,
          :modelToken => String.t() | nil,
          :speechTrainResp => GoogleApi.Language.V1.Model.XPSSpeechModelSpec.t() | nil,
          :tablesTrainResp => GoogleApi.Language.V1.Model.XPSTablesTrainResponse.t() | nil,
          :textToSpeechTrainResp =>
            GoogleApi.Language.V1.Model.XPSTextToSpeechTrainResponse.t() | nil,
          :textTrainResp => GoogleApi.Language.V1.Model.XPSTextTrainResponse.t() | nil,
          :translationTrainResp =>
            GoogleApi.Language.V1.Model.XPSTranslationTrainResponse.t() | nil,
          :videoActionRecognitionTrainResp =>
            GoogleApi.Language.V1.Model.XPSVideoActionRecognitionTrainResponse.t() | nil,
          :videoClassificationTrainResp =>
            GoogleApi.Language.V1.Model.XPSVideoClassificationTrainResponse.t() | nil,
          :videoObjectTrackingTrainResp =>
            GoogleApi.Language.V1.Model.XPSVideoObjectTrackingTrainResponse.t() | nil
        }

  field(:deployedModelSizeBytes)

  field(:errorAnalysisConfigs,
    as: GoogleApi.Language.V1.Model.XPSVisionErrorAnalysisConfig,
    type: :list
  )

  field(:evaluatedExampleSet, as: GoogleApi.Language.V1.Model.XPSExampleSet)
  field(:evaluationMetricsSet, as: GoogleApi.Language.V1.Model.XPSEvaluationMetricsSet)

  field(:explanationConfigs,
    as: GoogleApi.Language.V1.Model.XPSResponseExplanationSpec,
    type: :list
  )

  field(:imageClassificationTrainResp,
    as: GoogleApi.Language.V1.Model.XPSImageClassificationTrainResponse
  )

  field(:imageObjectDetectionTrainResp,
    as: GoogleApi.Language.V1.Model.XPSImageObjectDetectionModelSpec
  )

  field(:imageSegmentationTrainResp,
    as: GoogleApi.Language.V1.Model.XPSImageSegmentationTrainResponse
  )

  field(:modelToken)
  field(:speechTrainResp, as: GoogleApi.Language.V1.Model.XPSSpeechModelSpec)
  field(:tablesTrainResp, as: GoogleApi.Language.V1.Model.XPSTablesTrainResponse)
  field(:textToSpeechTrainResp, as: GoogleApi.Language.V1.Model.XPSTextToSpeechTrainResponse)
  field(:textTrainResp, as: GoogleApi.Language.V1.Model.XPSTextTrainResponse)
  field(:translationTrainResp, as: GoogleApi.Language.V1.Model.XPSTranslationTrainResponse)

  field(:videoActionRecognitionTrainResp,
    as: GoogleApi.Language.V1.Model.XPSVideoActionRecognitionTrainResponse
  )

  field(:videoClassificationTrainResp,
    as: GoogleApi.Language.V1.Model.XPSVideoClassificationTrainResponse
  )

  field(:videoObjectTrackingTrainResp,
    as: GoogleApi.Language.V1.Model.XPSVideoObjectTrackingTrainResponse
  )
end

defimpl Poison.Decoder, for: GoogleApi.Language.V1.Model.XPSTrainResponse do
  def decode(value, options) do
    GoogleApi.Language.V1.Model.XPSTrainResponse.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Language.V1.Model.XPSTrainResponse do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
